package com.qf.springMVCRegisterDemo.controller;

import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 刘欣
 * @createTime 2023/1/4 19:34
 * @description
 */
@RestController
@RequestMapping("/user")
public class UserController {
    @RequestMapping("/checkName")
    public String checkName(@RequestBody String name) {
        if (!name.equals("admin")) {
            return "1";
        } else {
            return "2";
        }
    }
}
